package com.team11.server.pojo.dto;


import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("addHomeWork")
@ApiModel(value = "addHomeWork", description = "addHomeWork")
public class AddHomeWork {

    @NotNull(message = "计划完成时间不能为空")
    @ApiModelProperty(value = "结束时间")
    @TableField("h_stoptime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private LocalDateTime hStoptime;

    @NotNull(message = "作业类型不能为空")
    @ApiModelProperty(value = "作业类型(1为日常作业，2为阶段性交付作业，3为最终交付作业)")
    @TableField("h_type")
    private Integer hType;

    @ApiModelProperty(value = "作业主题")
    @NotBlank(message = "作业主题不能为空")
    @TableField("h_title")
    private String hTitle;

    @NotNull(message = "课程不能为空")
    @ApiModelProperty(value = "课程id")
    @TableField("kc_id")
    private Integer kcId;

    @ApiModelProperty(value = "作业内容")
    @TableField("s_content")
    private String sContent;
}
